ObjectMixin
Sub classes
| Name | Children | Inherits |
|---|---|---|
| Object prettyqt.core.object The base class of all Qt objects. |
|
|
| SocketNotifier prettyqt.core.socketnotifier Support for monitoring activity on a file descriptor. |
||
| SharedMemory prettyqt.core.sharedmemory Access to a shared memory segment. |
||
| SignalMapper prettyqt.core.signalmapper Bundles signals from identifiable senders. |
||
| TimeLine prettyqt.core.timeline Timeline for controlling animations. |
||
| AbstractEventDispatcher prettyqt.core.abstracteventdispatcher Interface to manage Qt's event queue. |
||
| EventLoop prettyqt.core.eventloop Means of entering and leaving an event loop. |
||
| AbstractAnimationMixin prettyqt.core.abstractanimation The base of all animations. |
||
TranslatorMixinprettyqt.core.translator |
||
| CoreApplicationMixin prettyqt.core.coreapplication |
||
| FileSystemWatcher prettyqt.core.filesystemwatcher Interface for monitoring files and directories for modifications. |
||
| FileSelector prettyqt.core.fileselector Convenient way of selecting file variants. |
||
| IODeviceMixin prettyqt.core.iodevice |
||
Settings_prettyqt.core.settings Persistent platform-independent application settings. |
||
| Timer prettyqt.core.timer Repetitive and single-shot timers. |
|
|
| Thread prettyqt.core.thread Platform-independent way to manage threads. |
||
| MimeData prettyqt.core.mimedata Container for data that records information about its MIME type. |
||
| ThreadPool prettyqt.core.threadpool Manages a collection of QThreads. |
||
| ItemSelectionModel prettyqt.core.itemselectionmodel Keeps track of a view's selected items. |
||
| AbstractItemModelMixin prettyqt.core.abstractitemmodel |
||
| Library prettyqt.core.library Loads shared libraries at runtime. |
||
| PluginLoader prettyqt.core.pluginloader Load a plugin at runtime. |
||
| AccessibilityHintsMixin prettyqt.gui.accessibilityhints |
||
| StyleHintsMixin prettyqt.gui.stylehints |
||
| Shortcut prettyqt.gui.shortcut |
||
| Drag prettyqt.gui.drag Support for MIME-based drag and drop data transfer. |
||
| WindowMixin prettyqt.gui.window |
||
| Clipboard prettyqt.gui.clipboard Access to the window system clipboard. |
||
| InputMethod prettyqt.gui.inputmethod |
||
| SessionManager prettyqt.gui.sessionmanager |
||
| ValidatorMixin prettyqt.gui.validator |
||
TextDocumentMixinprettyqt.gui.textdocument |
||
| Movie prettyqt.gui.movie Convenience class for playing movies with QImageReader. |
||
| PdfWriter prettyqt.gui.pdfwriter Class to generate PDFs that can be used as a paint device. |
||
| TextObjectMixin prettyqt.gui.textobject |
|
|
| AbstractTextDocumentLayoutMixin prettyqt.gui.abstracttextdocumentlayout |
||
SyntaxHighlighterMixinprettyqt.gui.syntaxhighlighter |
||
UndoStackMixinprettyqt.gui.undostack |
||
UndoGroupMixinprettyqt.gui.undogroup |
||
| ActionMixin prettyqt.gui.action |
||
| ActionGroup prettyqt.gui.actiongroup Groups actions together. |
||
| StyleMixin prettyqt.widgets.style |
||
| WidgetMixin prettyqt.widgets.widget |
||
| GraphicsTransformMixin prettyqt.widgets.graphicstransform |
||
| GraphicsObjectMixin prettyqt.widgets.graphicsobject |
||
| GraphicsAnchor prettyqt.widgets.graphicsanchor Represents an anchor between two items in a QGraphicsAnchorLayout. |
||
| GraphicsEffectMixin prettyqt.widgets.graphicseffect |
||
| GraphicsScene prettyqt.widgets.graphicsscene Surface for managing a large number of 2D graphical items. |
||
| Completer prettyqt.widgets.completer Completions based on an item model. |
||
| Scroller prettyqt.widgets.scroller Enables kinetic scrolling for any scrolling widget or graphics item. |
||
| AbstractItemDelegateMixin prettyqt.widgets.abstractitemdelegate |
||
| SystemTrayIcon prettyqt.widgets.systemtrayicon Icon for an application in the system tray. |
||
| LayoutMixin prettyqt.widgets.layout |
|
|
| ButtonGroup prettyqt.widgets.buttongroup Container to organize groups of button widgets. |
||
| DataWidgetMapper prettyqt.widgets.datawidgetmapper Mapping between a section of a data model to widgets. |
||
| GestureMixin prettyqt.widgets.gesture |
|
|
| BluetoothLocalDevice prettyqt.bluetooth.bluetoothlocaldevice Enables access to the local Bluetooth device. |
||
| BluetoothServer prettyqt.bluetooth.bluetoothserver Uses the RFCOMM or L2cap protocol to communicate with a Bluetooth device. |
||
| BluetoothDeviceDiscoveryAgent prettyqt.bluetooth.bluetoothdevicediscoveryagent Discovers the Bluetooth devices nearby. |
||
| BluetoothServiceDiscoveryAgent prettyqt.bluetooth.bluetoothservicediscoveryagent Enables you to query for Bluetooth services. |
||
| BarSet prettyqt.charts.barset |
||
| BoxSet prettyqt.charts.boxset |
||
| CandlestickSet prettyqt.charts.candlestickset |
||
| PieSlice prettyqt.charts.pieslice |
||
| AbstractAxisMixin prettyqt.charts.abstractaxis |
||
| AbstractSeriesMixin prettyqt.charts.abstractseries |
||
| PyDesignerTaskMenuExtension prettyqt.designer.pydesignertaskmenuextension |
||
| DesignerFormEditorInterface prettyqt.designer.designerformeditorinterface Allows you to access Qt Designer's various components. |
||
| GeoPositionInfoSourceMixin prettyqt.positioning.geopositioninfosource |
||
| GeoSatelliteInfoSource prettyqt.positioning.geosatelliteinfosource |
||
| GeoAreaMonitorSource prettyqt.positioning.geoareamonitorsource |
||
| GeoCodingManager prettyqt.location.geocodingmanager Support for geocoding operations. |
||
| GeoRoutingManager prettyqt.location.georoutingmanager Support for geographic routing operations. |
||
| PlaceReplyMixin prettyqt.location.placereply |
||
| GeoServiceProvider prettyqt.location.geoserviceprovider Aggregates access to services which provide geographical information. |
||
| Camera prettyqt.multimedia.camera |
||
| MediaPlayer prettyqt.multimedia.mediaplayer |
||
| ScreenCapture prettyqt.multimedia.screencapture |
||
| MediaRecorder prettyqt.multimedia.mediarecorder |
||
| NetworkCookieJar prettyqt.network.networkcookiejar Implements a simple jar of QNetworkCookie objects. |
||
| LocalServer prettyqt.network.localserver Local socket based server. |
||
| TcpServer prettyqt.network.tcpserver TCP-based server. |
||
| HttpMultiPart prettyqt.network.httpmultipart Resembles a MIME multipart message to be sent over HTTP. |
||
| NetworkAccessManager prettyqt.network.networkaccessmanager Allows the application to send network requests and receive replies. |
||
| RestAccessManager prettyqt.network.restaccessmanager Convenience wrapper around QNetworkAccessManager for RESTful APIs. |
||
| PdfDocument prettyqt.pdf.pdfdocument Loads a PDF document and renders pages from it. |
||
| QmlExpression prettyqt.qml.qmlexpression Evaluates JavaScript in a QML context. |
||
| QmlPropertyMapMixin prettyqt.qml.qmlpropertymap |
||
| JSEngineMixin prettyqt.qml.jsengine |
||
| QmlComponent prettyqt.qml.qmlcomponent Encapsulates a QML component definition. |
||
| HelpEngineCoreMixin prettyqt.qthelp.helpenginecore The core functionality of the help system. |
||
| HelpSearchEngine prettyqt.qthelp.helpsearchengine Access to widgets reusable to integrate fulltext search. |
||
| HelpFilterEngine prettyqt.qthelp.helpfilterengine Filtered view of the help contents. |
||
| QuickTextDocument prettyqt.quick.quicktextdocument Access to the QTextDocument of QQuickTextEdit. |
||
| QuickRenderControl prettyqt.quick.quickrendercontrol Mechanism for rendering the Qt Quick scenegraph onto an offscreen render target. |
||
| QuickImageResponse prettyqt.quick.quickimageresponse Interface for asynchronous image loading in QQuickAsyncImageProvider. |
||
| QuickItemGrabResult prettyqt.quick.quickitemgrabresult Contains the result from QQuickItem::grabToImage(). |
||
| QuickItemMixin prettyqt.quick.quickitem |
||
| ScxmlStateMachine prettyqt.scxml.scxmlstatemachine Interface to the state machines created from SCXML files. |
||
| ScxmlDataModelMixin prettyqt.scxml.scxmldatamodel |
||
| ScxmlInvokableService prettyqt.scxml.scxmlinvokableservice The base class for services called from state machines. |
||
| ScxmlInvokableServiceFactory prettyqt.scxml.scxmlinvokableservicefactory Creates invokable service instances. |
||
| AmbientSound prettyqt.spatialaudio.ambientsound A stereo overlay sound. |
||
| AudioEngine prettyqt.spatialaudio.audioengine Manages a three dimensional sound field. |
||
| AudioListener prettyqt.spatialaudio.audiolistener Defines the position and orientation of the person listening to a sound field. |
||
| AudioRoom prettyqt.spatialaudio.audioroom Represents a room with its acoustic properties. |
||
| SpatialSound prettyqt.spatialaudio.spatialsound A sound object in 3D space. |
||
| AbstractStateMixin prettyqt.statemachine.abstractstate |
||
| AbstractTransitionMixin prettyqt.statemachine.abstracttransition |
||
| SvgRenderer prettyqt.svg.svgrenderer |
||
| TextToSpeech prettyqt.texttospeech.texttospeech |
||
| WebChannel prettyqt.webchannel.webchannel |
||
| WebEngineUrlSchemeHandler prettyqt.webenginecore.webengineurlschemehandler |
|
|
| WebEnginePage prettyqt.webenginecore.webenginepage A web engine page holds the HTML document contents, link history + actions. |
||
| WebEngineProfile prettyqt.webenginecore.webengineprofile |
🛈 DocStrings
Bases: _ObjectBase
Source code in prettyqt/core/object.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | |
add_callback_for_event(callback: Callable[[core.QEvent], bool], include: core.QEvent.Type | core.event.TypeStr | Sequence[core.QEvent.Type | core.event.TypeStr] | None = None, exclude: core.QEvent.Type | core.event.TypeStr | Sequence[core.QEvent.Type | core.event.TypeStr] | None = None) -> eventfilters.EventCatcher
Connect widget events to a callback.
if include is set, it behaves like a whitelist. if exclude is set, it behaves like a blacklist. The QEvent is passed to the callback as an argument, and the callback needs to return True or False to indicate whether the Event should be filtered.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
callback
|
Callable[[QEvent], bool]
|
Callback to execute when event is triggered |
required |
include
|
Type | TypeStr | Sequence[Type | TypeStr] | None
|
Events to include |
None
|
exclude
|
Type | TypeStr | Sequence[Type | TypeStr] | None
|
Events to exclude |
None
|
Source code in prettyqt/core/object.py
find_child(typ: type[T] = core.QObject, name: str | core.QRegularExpression | None = None, recursive: bool = True) -> T | None
Find a child with given type and name.
Source code in prettyqt/core/object.py
find_children(typ: type[T] = core.QObject, name: str | datatypes.PatternType | None = None, recursive: bool = True, property_selector: dict[str, Any] | None = None, only_prettyqt_classes: bool = False) -> listdelegators.ListDelegator[T]
Find children with given type and name.
Children can be filtered by passing a property selector dictionary. It must contain the property name for keys and either a value which must be set or a predicate function which gets the property value as an argument and must return True if the child should be included.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
typ
|
type[T]
|
Subclass of QObject (can also be a UnionType) |
QObject
|
name
|
str | PatternType | None
|
ObjectName filter. None includes all. |
None
|
recursive
|
bool
|
whether to search for children recursively. |
True
|
property_selector
|
dict[str, Any] | None
|
dict containing PropertyName -> Value/Predicate pairs. |
None
|
only_prettyqt_classes
|
bool
|
only include objects with prettyqt superpowers. |
False
|
Source code in prettyqt/core/object.py
find_parent(typ: type[T] = core.QObject, name: str | None = None) -> T | None
Find parent with given type or name.
Source code in prettyqt/core/object.py
get_dynamic_properties() -> dict[str, Any]
Get a dictionary with all dynamic properties.
get_properties(include_super: bool = True, cast: bool = True, only_writable: bool = False, only_nonempty: bool = False) -> dict[str, Any]
Get a dictionary containing all properties and their values.
Source code in prettyqt/core/object.py
installEventFilter(filter_: core.QObject | str, **kwargs)
Override to also allow setting eventfilters by name.
Source code in prettyqt/core/object.py
properties_set_to(**kwargs)
Context manager to temporarily set properties to different values.
Source code in prettyqt/core/object.py
set_object_name(name: str)
set_properties(props: dict[str, Any], include_super: bool = True)
Set properties from a dictionary.
Source code in prettyqt/core/object.py
set_unique_id()
signal_blocked(signal: core.SignalInstance, receiver: Callable | core.SignalInstance)
Context manager to temporarily disconnect specific signal.
Source code in prettyqt/core/object.py
signals_blocked()
Context manager to temporarily block emitting signals.
start_callback_timer(callback: Callable, interval: int | str, single_shot: bool = False, timer_type: constants.TimerTypeStr = 'coarse') -> core.Timer
Start timer and execute callback when timeout reached.
Source code in prettyqt/core/object.py
start_timer(interval: int | str, timer_type: constants.TimerTypeStr = 'coarse') -> int | None
Start a timer and return the timer id, to be used in timerEvent.